package com.hellowx.qydcdev.controller;

import com.hellowx.qydcdev.entity.BusinessCategory;
import com.hellowx.qydcdev.service.BusinessCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created on 2022/1/5.
 *
 * @author Hello WX
 */
@Api(tags = "店铺分类模块")
@RestController
@RequestMapping("/businessCategory")
public class BusinessCategoryController {

    @Resource
    private BusinessCategoryService businessCategoryService;

    @ApiOperation("查询所有店铺分类")
    @GetMapping("/all")
    public ResponseEntity<List<BusinessCategory>> getBusinessCategoryAll(){
        List<BusinessCategory> businessCategoryList = businessCategoryService.selectAll();
        return ResponseEntity.ok(businessCategoryList);
    }
}
